<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <link rel="stylesheet" href="layui/css/layui.css">
    <title>小说信息编辑</title>
</head>

<body class="layui-bg-gray">
    <!--顶部导航栏-->
    <%@ include file="novelhead.jsp" %>
    <!--内容部分-->
    <div class="layui-fluid" style="margin-top:20px">
        <div class="layui-row  layui-col-space20">
            <!--博主信息列表-->
            <div class="layui-col-md3">
                <div class="layui-row" style="text-align: center;background-color:white;">
                    <div style="text-align: center;">     
	                    <img src="../upload/${user.photourl}" style="width:80px;height:110px;margin-top: 40px;"
                            class="layui-circle">
                        <h3 style="margin-bottom: 20px">
                            <b>
                                <a href="">${user.nickname}</a>
                            </b>
                        </h3>
                        <h4 style="margin-bottom: 20px;width:80%;margin-left:25px;">${user.signature }</h4>
                        <hr style="margin-bottom: 30px">
                    </div>

                    <div style="" class="layui-col-md4">
                        <img src="img/novelnum.jpg" style="width:40px;height:40px;" class="layui-circle">
                        <h6 style="font-size: 4px;margin-top: 5px;">作品数量</h6>
                        <h6 style="font-size: 4px;margin-top: 5px;color: red"><b>${user.novelcount }</b></h6>
                    </div>
                    <div style="" class="layui-col-md4">
                        <img src="img/textnum.jpg" style="width:40px;height:40px;" class="layui-circle">
                        <h6 style="font-size: 4px;margin-top: 5px;">累计字数</h6>
                        <h6 style="font-size: 4px;margin-top: 5px;color: red"><b>4028.86万</b></h6>
                    </div>
                    <div style="margin-bottom: 60px" class="layui-col-md4">
                        <img src="img/daynum.jpg" style="width:40px;height:40px;" class="layui-circle">
                        <h6 style="font-size: 4px;margin-top: 5px;">创作天数</h6>
                        <h6 style="font-size: 4px;margin-top: 5px;color: red"><b>5103</b></h6>
                    </div>

                </div>
            </div>
            <!--小说相关信息编辑-->
            <div class="layui-col-md9">
                <!--小说信息-->
                <div class="layui-card">
                    <div class="layui-row">
                        <div class="layui-card-header layui-col-md10">
                            <h3>小说信息</h3>
                        </div>
                        <div class="layui-col-md2">
                            <a href="getcompnovel.action?novelid=${novel.novelid }" class="layui-btn"
                            style="margin-top:10px;">修改小说信息</a>
                        </div>
                    </div>
                    <div class="layui-card-body">
                        <table class="layui-table" style="text-align: center">
                            <tr>
                                <td style="width:20%;background-color:orange;color: white">小说封面图片</td>                            
                                <td>
	                                
				                     	<img src="../upload/${novel.photourl}">
				                    
				                    
			                    </td>
                            </tr>
                            <tr>
                                <td style="width:20%;background-color:orange;color: white">小说名称</td>
                                <td>${novel.novelname}</td>
                            </tr>
                            <tr>
                                <td style="width:20%;background-color:orange ;color: white">小说简介</td>
                                <td>${novel.abstrac}</td>
                            </tr>
                            <tr>
                                <td style="width:20%;background-color:orange ;color: white">分类关键字</td>
                                <td>${novel.typename }</td>
                            </tr>
                        </table>
                    </div>
                </div>
                <!--小说内容管理-->
                <div class="layui-card">
                    <div class="layui-card-header">
                    	<div class="layui-card-header layui-col-md10">
                            <h3 style="display: inline-block">小说章节管理</h3>
                        </div>
                        <div class="layui-col-md2">
                            <a href="getchap.action?novelid=${novel.novelid }" class="layui-btn"
                            style="margin-top:10px;">+添加新章节</a>
                        </div>
                        
                    </div>
                    <div class="layui-card-body">
                        <table class="layui-table" lay-even lay-skin="line" id="countent">
	                        <c:forEach items="${novelContent}" var="content">
	                        	<tr>
	                        		<td>
	                        			${content.ordernum }
	                        		</td>
	                        		<td>
	                        			${content.chaptername }
	                        		</td>
	                        		<td>
	                        			${content.createtime }
	                        		</td>
	                        		<td>
	                        			${content.nickname }
	                        		</td>
	                        		<c:if test="${content.auditstatus == 'True' }">
		                        		<td style="color:green">
		                        			审核通过
		                        		</td>
	                        		</c:if>
	                        		<c:if test="${content.auditstatus == 'False' }">
		                        		<td style="color:red">
		                        			审核中
		                        		</td>
	                        		</c:if>
	                        		<td>
	                        			<a href="getchapnovel.action?chapterid=${content.chapterid }" 
	                        			class="layui-btn layui-btn layui-btn-sm layui-btn layui-btn-normal">编辑章节</a>
	                        			<a href="delectchap.action?chapterid=${content.chapterid  }
	                        			&novelid=${content.novelid  }" 
	                        			class="layui-btn layui-btn layui-btn-sm layui-btn layui-btn-danger">删除章节</a>
	                        		</td>
	                        		
	                        	</tr>
	                        	
                        	</c:forEach>
                        </table>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <%@ include file="foot.jsp" %>
    <script src="layui/layui.js"></script>
    <!--导航js-->
    <script>
        //注意：导航 依赖 element 模块，否则无法进行功能性操作
        layui.use('element', function () {
            var element = layui.element;

            //…
        });
        
    </script>

    
</body>

</html>